<script src="/js/jquery.min.js"></script>
<script src="/css/layui/layui.js"></script>
<script>
    $(function(){
        layui.use('element', function(){
            var element = layui.element;
        });
        $('#logout').on('click', function(){
            $.ajax({
                url: '/cms/logout',
                type: 'post',
                data: {},
                success: function(d){
                    if(d.code == 200){
                        window.location.href = '/admin/login';
                    }
                }
            })
        })
    })
</script>